Skip to main content

Automation Studio new Data Views to improve Automation Health

It has been a while since Salesforce introduced new Data Views. Well, this is no longer the case as with the recent release of Marketing Cloud (05/10/2022) comes not only one but two new Data Views. _AutomationInstance and _AutomationActivityInstance will help you identify points of failure and improve the efficiency and success rate of your automations by reviewing their health.

Data View: Automation Instance


Wondering which automations failed yesterday? Or which ones skipped this week? Or maybe you need an average duration of each automation in a specific Business Unit?

These are some examples of what you can accomplish by querying this Data View. It helps to get an overview of all automations within a tenant and improve the efficiency and success rate by continuously reviewing their health.

What _AutomationInstance Data View Shows

  • Automations that ran recently
  • When an automation ran
  • The duration of an automation
  • Whether an automation succeeded, skipped, or failed
  • The reason an automation failed
  • The file that was being processed when a triggered automation failed

This Data View is available by default on all accounts. The data for the last 31 days is available 1 day after the automation runs.

caution

Similar to _Job, this Data View holds specific Child BU’s data. You can not query `_AutomationInstance` from the Parent BU

note

Dates are in UTC

_AutomationInstance Columns

NAMEDESCRIPTIONDATA EXTENSION DATA TYPE
MemberIDThe unique ID of the business unit.Number
AutomationNameThe automation name.Text
AutomationDescriptionThe automation description.Text
AutomationCustomerKeyThe unique ID of the automation.Text
AutomationTypeThe automation’s starting source. Possible values are Schedule, File Drop, or Trigger.Text
AutomationNotificationRecipient_CompleteThe email address where notifications about completed automations are sent.Text
AutomationNotificationRecipient_ErrorThe email address where notifications about automation errors are sent.Text
AutomationNotificationRecipient_SkipThe email address where notifications about skipped automations are sent.Text
AutomationStepCountThe number of steps in the automation.Number
AutomationInstanceIDThe unique ID of the automation run.Text
AutomationInstanceIsRunOnceWhether the automation was set to run once. 1 = true, 0 = false.Boolean
FilenameFromTriggerFor file drop and trigger automations, the file that started the automation.Text
AutomationInstanceScheduledTime_UTCFor scheduled automations, the time that the run was scheduled to begin.Date
AutomationInstanceStartTime_UTCThe time that the automation run started. This value is blank if the run hasn’t started.Date
AutomationInstanceEndTime_UTCThe time that the automation run ended. This value is blank if the run hasn’t ended.Date
AutomationInstanceStatusThe status of the automation. Possible values are QueuedFile, Initialized, Executing, Stopped, Complete, or Error.Text
AutomationInstanceActivityErrorDetailsThe message from the error log, if applicable. If a system or unclassified error occurs, the value is System Error. If multiple errors occur, only the first message is displayed. To get details on multiple errors, use the _AutomationActivityInstance view.Text
info

Note that there is a typo in the official documentation. The name of the column is AutomationNotificationRecipient_Complete instead of AutomationNotificationRecipient_Compete.

Data View: Automation Activity Instance


Are you looking for activities at risk of timing out? Do you need the average duration of each activity inside an automation? Or maybe a list of activities that failed because of an error?

This Data View stores all runs of activities inside your automations. It can be used to prevent failures by identifying activities that often fail or run long.

What _AutomationActivityInstance Data View Shows

  • Activities that ran in an automation
  • When an activity ran
  • The duration of an activity
  • Whether an activity succeeded or failed
  • The reason an activity failed

This Data View is available by default on all accounts. The data for the last 31 days is available 1 day after the automation runs.

caution

Similar to _Job, this Data View holds specific Child BU’s data. You can not query `_AutomationActivityInstance` from the Parent BU

note

Dates are in UTC

Example: Which Automations Are Failing and Why?

An automation error can be categorized as a configuration error or system error.

  • A configuration error occurs because an activity or dependency isn’t set up correctly. For example, if a file transfer activity is looking for a file that doesn’t exist.
  • A system error is more general and often temporary—for example, a timeout error for a query trying to run for more than 30 minutes.

Before having access to this Data View, the quickest and easiest way to have more details about an automation’s error that is more detailed than the standard “an error occurred while….” was by asking the support. This is no longer the case as you can query _AutomationActivityInstance to find activities that failed because of a configuration error and check the error message to learn how you can address the error. Use this query from:

SELECT *
FROM [_automationactivityinstance]
WHERE activityinstancestatus = 'Error'
AND activityinstancestatusdetails LIKE 'System Error occurred%'

The same way, but this time you can use this query to get activities that failed because of a system error:

SELECT *
FROM [_automationactivityinstance]
WHERE activityinstancestatus = 'Error'
AND activityinstancestatusdetails NOT LIKE 'System Error occurred%'

_AutomationActivityInstance Columns

NAMEDESCRIPTIONDATA EXTENSION DATA TYPE
MemberIDThe unique ID of the business unit.Number
AutomationNameThe automation name.Text
AutomationCustomerKeyThe unique ID of the automation.Text
AutomationInstanceIDThe unique ID of the automation run.Text
ActivityTypeThe activity type. Possible values are listed in the Activity Type IDs table below.Number
ActivityNameThe activity name.Text
ActivityDescriptionThe activity description.Text
ActivityCustomerKeyThe unique ID of the activity.Text
ActivityInstanceStepWhere the activity occurs in the automation. For example, 3.2 is step 3, activity 2.Text
ActivityInstanceIDThe unique ID of the activity run.Text
ActivityInstanceStartTime_UTCThe time that the activity run started.Date
ActivityInstanceEndTime_UTCThe time that the activity run ended.Date
ActivityInstanceStatusThe status of the activity. Possible values are Initialized, Executing, Complete, Error, or NotSelected.Text
ActivityInstanceErrorDetailsThe message from the error log, if applicable. If a system or unclassified error occurs, the value is System Error.Text

And to get all the details you need here are the ActivityType possible IDs:

Activity Type IDs

ACTIVITY TYPE IDACTIVITY NAME
33SMS Activity
42Send Email
43Import File
45Refresh Group
53File Transfer
73Data Extract
84Report Definition
300SQL Query
303Filter
423Script
425Data Factory Utility Activity
426Refresh Segment Template
427Publish Audience
467Wait
724Refresh Mobile Filtered List
725Send SMS
726Import Mobile Contacts
733Journey Builder Event Activity
736Send Push
749Fire Event
771Salesforce Email Send
772Mobile Connect Send Salesforce Sync Subscriber
783Send GroupConnect
1000Verification
1010Interaction Studio Data
1101Interactions
1701Batch Personalization
3700Contact to Business Unit Mapping

I have not yet played with these two Data Views, but very excited to check them out. I can already think of some interesting use cases where they can be used. I’ll share with you my findings, I promise ! In the meantime, have fun using SFMC !